import React from 'react'

class UnitSettingTools extends React.Component {

  constructor(props) {
    super(props)
  }

  componentDidMount() {

  }

  onDataSearch(event) {

    var input = this.refs.property_search;
    var value = $(input).val();
    this.props.onDataSearch(value)
  }

  render() {
    return (
      <div className="Property-setting-tools row">
        <div className="col-sm-4 f-dn">

        </div>
        <div className="col-xs-2 col-sm-2 col-lg-1 col-sm-offset-7 col-lg-offset-8  col-xs-offset-7 create-button">
          <button type="button" className="btn-create f-dn"
                  onClick={(event)=>this.props.onCreateClick()}>新建</button>
        </div>
        <div className="col-xs-3 col-sm-3 col-sm-offset-6 col-xs-offset-6 create-button">
          <button type="button" className="btn-bind"
                  onClick={(event)=>this.props.onBindClick()}>管家客服绑定</button>
        </div>
        <div className="col-sm-3 col-xs-3">
          <div className="input-group search-group">
            <i className="ti-search"></i>
            <input type="text" ref="property_search" className="form-control" placeholder="请搜索户号"
                  onChange={(event)=>this.onDataSearch(event)}/>
          </div>
        </div>


      </div>
    )
  }

}

export default UnitSettingTools
